#include "ParticleGravityGenerator.h"


namespace SimPhy
{


ParticleGravityGenerator::ParticleGravityGenerator(const Vector3D& gravityAcceleration) : m_gravityAcceleration(gravityAcceleration)
{
}

ParticleGravityGenerator::~ParticleGravityGenerator()
{
}

void ParticleGravityGenerator::updateForce(Particle *particle, real timeStep)
{
    if(particle->hasFiniteMass())
        particle->addForce(m_gravityAcceleration*particle->getMass());
}

}
